package com.example.PullGame;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.wonderfulradish.ActivityCollector;
import com.example.wonderfulradish.Choose_Game;
import com.example.wonderfulradish.R;

public class PullRadishSelect extends AppCompatActivity implements View.OnClickListener{

    private Button pullselectback;
    private Button startPull;
    private int flag;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityCollector.addActivity(this);
        setContentView(R.layout.activity_pull_radish_select);
        pullselectback=(Button) findViewById(R.id.pullselectback);
        pullselectback.setOnClickListener(this);
        startPull=(Button) findViewById(R.id.startPull);
        startPull.setOnClickListener(this);

    }

    @Override
    public void onClick(View v){
        switch (v.getId()){
            case R.id.pullselectback:
                Intent intent=new Intent(PullRadishSelect.this,Choose_Game.class);
                startActivity(intent);
                finish();
                break;
            case R.id.startPull:
                startPull.setBackgroundResource(R.drawable.guanqia_btn1_png);
                Intent intent1=new Intent(PullRadishSelect.this,StartPullActivity.class);
                startActivity(intent1);
                finish();
            default:
                break;
        }
    }

    @Override
    protected void onDestroy(){
        super.onDestroy();
        ActivityCollector.removeActivity(this);
    }
}
